import Vue from 'vue'
import VueI18n from 'vue-i18n'

Vue.use(VueI18n)

const messages = {
  en: {
    nav: {
      home: 'Home',
      about: 'About',
      projects: 'Projects',
      contact: 'Contact'
    },
    home: {
      greeting: 'Hi, I am',
      role: 'Frontend Developer',
      description: 'Passionate about creating beautiful and functional web experiences'
    },
    about: {
      title: 'About Me',
      description: 'I am a frontend developer with experience in Vue.js and modern web technologies.',
      skills: 'Skills',
      experience: 'Experience'
    },
    projects: {
      title: 'My Projects',
      viewMore: 'View More'
    },
    contact: {
      title: 'Get in Touch',
      name: 'Name',
      email: 'Email',
      message: 'Message',
      send: 'Send Message'
    },
    notFound: {
      message: 'The page you are looking for does not exist.',
      backHome: 'Back to Home'
    }
  },
  zh: {
    nav: {
      home: '首页',
      about: '关于',
      projects: '项目',
      contact: '联系'
    },
    home: {
      greeting: '你好，我是',
      role: '前端开发工程师',
      description: '热衷于创造优美且实用的网页体验'
    },
    about: {
      title: '关于我',
      description: '我是一名前端开发工程师，擅长使用 Vue.js 和现代网页技术。',
      skills: '技能',
      experience: '经历'
    },
    projects: {
      title: '我的项目',
      viewMore: '查看更多'
    },
    contact: {
      title: '联系我',
      name: '姓名',
      email: '邮箱',
      message: '留言',
      send: '发送消息'
    },
    notFound: {
      message: '您访问的页面不存在。',
      backHome: '返回首页'
    }
  }
}

export default new VueI18n({
  locale: localStorage.getItem('language') || 'zh',
  messages
}) 